home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _389ABEB48A6B458EBCDD3B93F7FA7753 < prev    next >
Encoding:
Text File  |  2004-01-06  |  18.1 KB  |  667 lines

  1. --#Script:ReloadScript("scripts/Default/Entities/Others/piece.lua")
  2. Script:LoadScript("scripts/Default/Entities/Others/piece.lua")
  3.  
  4. HC = {
  5.  
  6.     HClanded = 1,
  7.  
  8. };
  9.  
  10. -- new particle explosions
  11. HeliExplosion = {
  12.     particleEffects = {
  13.         name = "explosions.helicopter_explosion.a",
  14.     },
  15.     sounds = {
  16.         {"Sounds/Weapons/RL/explosion1.wav",0,255,8,100000},
  17.         {"Sounds/Weapons/RL/explosion2.wav",0,255,8,100000},
  18.         {"Sounds/Weapons/RL/explosion3.wav",0,255,8,100000},
  19.     },
  20. }
  21.  
  22.  
  23. ----------------------------------------------------------------------------------------------------------------------------
  24. --
  25. --
  26. ----------------------------------------------------------------------------------------------------------------------------
  27. --
  28. --
  29.  
  30.  
  31.  
  32.  
  33. ----------------------------------------------------------------------------------------------------------------------------
  34. --
  35. --
  36. function HC:LoadModel()
  37.  
  38. System:Log( "loading HELY "..self.Properties.fileModel );
  39.  
  40. --    if(self.IsPhisicalized == 0) then
  41.     if( self.temp_ModelName ~= self.Properties.fileModel ) then
  42.         
  43. System:Log( "loading HELY ----------------------------------------------------- ");        
  44.         self:LoadObjectPiece(self.Properties.fileModel, -1 );
  45.         self:DrawObject(0,1);
  46.     
  47.         self.V22PhysParams.collide = 1;
  48.         self:CreateLivingEntity(self.V22PhysParams, Game:GetMaterialIDByName("mat_meat"));
  49.         self.temp_ModelName = self.Properties.fileModel;
  50.  
  51.         self:SetPhysicParams( PHYSICPARAM_FLAGS, {flags_mask=pef_pushable_by_players, flags=0} );
  52.  
  53.         --    load parts for explosion
  54.         local idx=1;
  55.         local    loaded=1;
  56.         self.piecesId={};
  57.         while loaded==1 do
  58.             local piece=Server:SpawnEntity("Piece");
  59. --            local piece=nil;
  60.             if(piece)then
  61.                 
  62.             System:Log( "loading Piece #"..idx );                    
  63.  
  64.                 self.piecesId[idx] = piece.id;
  65.                 loaded = piece.Load(piece,self.Properties.fileModel, idx );
  66.                 idx = idx + 1;
  67.             else
  68.                 break
  69.             end
  70.  
  71.         end
  72.         -- can't remove it coz on startup update (actual removing) is called befor playerSpawn 
  73.         -- on loading from checkpoint update (actual removing) is NOT called befor playerSpawn 
  74. --        if(idx>1) then
  75. --            Server:RemoveEntity( self.pieces[idx-1].id );
  76. --        end
  77.         self.piecesId[idx-1] = 0;
  78.     end    
  79.     self.temp_ModelName = self.Properties.fileModel;
  80. end
  81.  
  82.  
  83. ----------------------------------------------------------------------------------------------------------------------------
  84. --
  85.  
  86.  
  87.  
  88. ----------------------------------------------------------------------------------------------------------------------------
  89. --
  90. --
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97. ----------------------------------------------------------------------------------------------------------------------------
  98. --
  99. --
  100. function HC:OnShutDownServer()
  101.  
  102. System:LogToConsole( "Gunship OnShutDOWN ---------------------------" );
  103.  
  104.     self:ReleaseStuff();
  105.     
  106.     for idx,pieceId in self.piecesId do
  107. --System:Log( " Piece #"..idx );
  108.         Server:RemoveEntity( pieceId );
  109.     end
  110.  
  111. end
  112.  
  113.  
  114.  
  115. --////////////////////////////////////////////////////////////////////////////////////////
  116. function HC:ExecuteDamageModel()
  117.  
  118. --do return end
  119.  
  120.  
  121.  
  122.     -- maximum damage
  123.     if (self.damage>self.Properties.max_health) then
  124.         local vVec=self:GetHelperPos("vehicle_damage2",0); 
  125.         Particle:CreateParticle(vVec,g_Vectors.v001,self.DamageParticles2);
  126.         Particle:CreateParticle(vVec,g_Vectors.v001,self.DamageParticles3);
  127.         HC.BlowUp(self);
  128.  
  129. --MAX - add different damage particles here
  130.     elseif (self.damage>self.Properties.max_health*.75) then                
  131.         -- maximum damage (more than 75%)
  132.         local vVec=self:GetHelperPos("vehicle_damage1",0); 
  133.         Particle:CreateParticle(vVec,g_Vectors.v001,self.DamageParticles1); --vector(0,0,1) is up
  134.         Particle:CreateParticle(vVec,g_Vectors.v001,self.DamageParticles1a); --vector(0,0,1) is up
  135.     elseif (self.damage>self.Properties.max_health*.50) then                
  136.         -- midium damage (50%-75%)
  137.         local vVec=self:GetHelperPos("vehicle_damage1",0); 
  138.         Particle:CreateParticle(vVec,g_Vectors.v001,self.DamageParticles1); --vector(0,0,1) is up
  139.         Particle:CreateParticle(vVec,g_Vectors.v001,self.DamageParticles1a); --vector(0,0,1) is up
  140.     elseif (self.damage>self.Properties.max_health*.25) then                
  141.         -- small damage (25%-75%)
  142.         local vVec=self:GetHelperPos("vehicle_damage1",0); 
  143.         Particle:CreateParticle(vVec,g_Vectors.v001,self.DamageParticles1); --vector(0,0,1) is up
  144.         Particle:CreateParticle(vVec,g_Vectors.v001,self.DamageParticles1a); --vector(0,0,1) is up
  145.     end
  146.     
  147.     if (self.bExploded~=1 and self.lowHealth ) then
  148.         local vVec=self:GetHelperPos("vehicle_damage1",0); 
  149.         Particle:SpawnEffect(vVec,g_Vectors.v001,"fire.burning_after_explosion.a"); --vector(0,0,1) is up
  150.     end    
  151. end
  152.  
  153. --////////////////////////////////////////////////////////////////////////////////////////
  154.  
  155.  
  156. function HC:BlowUp()
  157.  
  158.     self:SwitchLight(0);    -- switch off attached lights
  159.     
  160.     if( self.ReleaseMountedWeapon) then
  161.         self:ReleaseMountedWeapon();
  162.     end    
  163.     VC.KillEveryone( self );
  164.     self:ReleaseStuff();
  165.  
  166.     if (self.bExploded==1) then
  167.         do return end
  168.     end
  169.  
  170. --    System:Log("BLOW UP!");    
  171.     local     explDir={x=0, y=0, z=1};
  172. --    ExecuteMaterial(self:GetPos(),explDir, HeliExplosion,1);
  173.     Particle:SpawnEffect(self:GetPos(),explDir, self.ExplosionEffect);
  174.  
  175.     local ExplosionParams = {};
  176.     ExplosionParams.damage= self.Properties.ExplosionParams.nDamage;
  177.     ExplosionParams.rmin = self.Properties.ExplosionParams.fRadiusMin;
  178.     ExplosionParams.rmax = self.Properties.ExplosionParams.fRadiusMax;
  179.     ExplosionParams.radius = self.Properties.ExplosionParams.fRadius;
  180.     ExplosionParams.impulsive_pressure = self.Properties.ExplosionParams.fImpulsivePressure;
  181.     ExplosionParams.shooter = self;
  182.     ExplosionParams.weapon = self.id;
  183. ---- 
  184.      ExplosionParams.pos =    self:GetHelperPos("vehicle_damage2",0); 
  185.     Game:CreateExplosion( ExplosionParams );
  186.  
  187.     --play explosion sound
  188. --    if (self.ExplosionSound ~= nil) then
  189. --        --make sure to place the explosion sound at the correct position
  190. --        Sound:SetSoundPosition(self.ExplosionSound,self:GetPos());
  191. --        Sound:PlaySound(self.ExplosionSound);
  192. --        --System:LogToConsole("playing explo sound");
  193. --    end
  194.  
  195.     self:SetTimer(50);
  196.  
  197.     self:EnableSave(0);
  198. ----    self.damage=0; 
  199.     self.bExploded=1;
  200.     --self.IsPhisicalized = 0; -- so that the next call to reset will reload the normal model
  201.     
  202.     VC.AIDriver( self, 0 );
  203.  
  204.     if( self.Event_IsDead ) then
  205.         self:Event_IsDead();
  206.     end
  207. end
  208.  
  209.  
  210.  
  211.  
  212. --------------------------------------------------------------------------------------------------------------
  213.  
  214.  
  215. function HC:BreakOnPieces()
  216.  
  217. local    pos=self:GetPos();
  218. local    angle=self:GetAngles();
  219. local    dir={x=0, y=0, z=1};
  220.  
  221.     self:DrawObject(0,0);    
  222.     self:EnablePhysics(0);
  223.  
  224. --System:Log( " DoPiece ");    
  225.  
  226.     for idx,pieceId in self.piecesId do
  227. --System:Log( " Piece #"..idx );
  228.         local pieceEnt = System:GetEntity( pieceId );
  229.         if( pieceEnt ) then
  230.             pieceEnt:DrawObject(0,1);
  231.             pieceEnt:EnablePhysics(1);
  232.             
  233.             pieceEnt:SetPos( pos );
  234.             pieceEnt:SetAngles( angle );        
  235.             dir.x= (2-random(0,4));
  236.             dir.y= (2-random(0,4));
  237.             dir.z= -1;
  238.             
  239.             pieceEnt:AddImpulseObj(dir, self.explosionImpulse*5000);
  240.             pieceEnt:Activate(  );
  241.             pieceEnt:SwitchLight(0);    -- switch off attached lights
  242.         end        
  243.     end
  244.  
  245.     HC.StopEngineSounds( self );
  246.  
  247.  
  248.     self:ReleaseStuff();
  249.     self:TriggerEvent(AIEVENT_DISABLE);
  250.     self:EnableUpdate( 0 );
  251. --    Server:RemoveEntity( self.id );    
  252.     
  253. end
  254.  
  255.  
  256. --------------------------------------------------------------------------------------------------------------
  257.  
  258.  
  259. function HC:ResetPieces()
  260.  
  261. --System:Log( " DoPiece ");    
  262.  
  263.     for idx,pieceId in self.piecesId do
  264. --System:Log( " Piece #"..idx );
  265. --        piece:Deactivate( piece );
  266.         local pieceEnt = System:GetEntity( pieceId );
  267.         if( pieceEnt ) then
  268.             pieceEnt:DrawObject(0,0);
  269.             pieceEnt:EnablePhysics(0);
  270.         end    
  271.     end
  272.     
  273. end
  274.  
  275.  
  276. ----------------------------------------------------------------------------------------------------------------------------
  277. --
  278. --
  279. function HC:LoadPeople()
  280.  
  281. --    self:AIDriver( 1 );
  282.  
  283. System:Log("Gunship LoadPeople  ");
  284.     
  285.     AI:Signal(SIGNALFILTER_GROUPONLY, 1, "wakeup", self.id);    
  286.     AI:Signal(SIGNALFILTER_GROUPONLY, 1, "SHARED_ENTER_ME_VEHICLE", self.id);
  287.     self.dropState = 0;
  288. --    self.driverWaiting = 1;
  289. end
  290.  
  291.  
  292.  
  293. --------------------------------------------------------------------------------------------------------------
  294. --
  295. function HC:Land( bNoSound )
  296.  
  297.     self.attacking = nil;
  298.  
  299.     local alt = self:GetHelperPos("land",1);
  300.     
  301.     self:SelectPipe(0,"h_standingtherestill");
  302.     
  303.     if(alt) then
  304.         self:SetAICustomFloat( alt.z );
  305.     else    
  306.         self:SetAICustomFloat( -5.0 );
  307.     end    
  308.     self.landed = 1;
  309.  
  310.     HC.StopRotor( self );
  311.     
  312.     if (bNoSound) then
  313.         do return end
  314.     end
  315.     if (self.Properties.bFadeEngineSound==0) then
  316.         self.CurrEngineFade=self.FadeEngineTime;
  317.         self.FadeDir=2;
  318.     else
  319.         if (self.sound_engine_stop) then
  320.             self:PlaySound(self.sound_engine_stop);
  321.         end
  322.         if (self.sound_engine) then
  323.             Sound:StopSound(self.sound_engine);
  324.         end
  325.     end
  326.     
  327. --    self:SetShaderFloat( "Speed", 0, 1, 1);    
  328.  
  329. --System:Log("\001 no rotate ");    
  330.     
  331. end
  332.  
  333.  
  334. --------------------------------------------------------------------------------------------------------------
  335. --
  336. function HC:Fly( )
  337.  
  338.     self:SetAICustomFloat( self.Properties.fFlightAltitude );
  339.     self.landed = 0;
  340.     
  341. --    self:SetShaderFloat( "Speed", 500, 1, 1);
  342.     
  343. end
  344.  
  345. --------------------------------------------------------------------------------------------------------------
  346. function HC:UpdateClient(dt)
  347.  
  348.     if (self.bExploded==1) then
  349.         do return end
  350.     end
  351.  
  352.     if (self.CurrEngineSoundTimeout and (self.CurrEngineSoundTimeout>0)) then
  353.         self.CurrEngineSoundTimeout=self.CurrEngineSoundTimeout-dt;
  354.         if (self.CurrEngineSoundTimeout<=0) then
  355.             if (self.sound_engine) then
  356.                 if (not Sound:IsPlaying(self.sound_engine)) then
  357.                     self:PlaySound(self.sound_engine);
  358.                 end
  359.             end
  360.         end
  361.     end
  362.     if (self.sound_engine and (self.Properties.bFadeEngineSound==0)) then
  363.         if (self.CurrEngineFade and (self.CurrEngineFade>0)) then
  364.             self.CurrEngineFade=self.CurrEngineFade-dt;
  365.             if (self.CurrEngineFade<=0) then
  366.                 if (self.FadeDir==2) then
  367.                     Sound:StopSound(self.sound_engine);
  368.                 end
  369.             else
  370.                 local fScale=self.CurrEngineFade/self.FadeEngineTime;
  371.                 if (self.FadeDir==1) then
  372.                     Sound:SetSoundRatio(self.sound_engine, 1-fScale);
  373.                 else
  374.                     Sound:SetSoundRatio(self.sound_engine, fScale);
  375.                 end
  376.             end
  377.         end
  378.     end
  379.  
  380.  
  381.     if(self.rotorOn == 0 and self.landed and self and
  382.         self.rotorSpeed > 0 and self.rotorSpeed < self.rotorSpeedUp*2) then
  383.         VC.AIDriver( self, 0 );
  384.     end
  385.     
  386.     local pos = self:GetPos();
  387. --    local soundpos=new(pos);
  388.     pos.z=pos.z-5;
  389. --    System:ApplyForceToEnvironment(pos, 2.3, 1);
  390.  
  391. --    if(self.landed == 0) then -- flying - do effects
  392.     if(self.rotorSpeed > 0) then
  393.         --do force - grass/bushes deformation
  394.         System:ApplyForceToEnvironment(pos, self.Properties.fBendRadius, self.Properties.fBendForce);
  395.         --do some nice particles
  396.         HC.DoDustWater(self, dt);
  397.     end    
  398.     
  399. --    no sounds - done by attaching soundSpot entity to helicopter entity on Steve's request    
  400. --    --do sounds
  401.     --if( _localplayer and _localplayer.id and self.sound_engine ~= nil ) then
  402.     if (self.sound_engine ~= nil ) then
  403.         -- no hellicopter sound whein inside
  404.     --    if( System:IsPointIndoors(_localplayer:GetPos()) ) then
  405.     --        if (Sound:IsPlaying(self.sound_engine)) then
  406.     --            Sound:StopSound(self.sound_engine);
  407.     --        end
  408.     --    else
  409.     end    
  410.  
  411.     self.part_time = self.part_time + dt;
  412.     if ( self.part_time >0.01) then        ------not every frame update
  413.         HC.ExecuteDamageModel( self );
  414.         self.part_time = 0;
  415.     end
  416.     
  417.     
  418.     
  419. end
  420.  
  421. --------------------------------------------------------------------------------------------------------------
  422. --
  423. function HC:DoDustWater( dt )
  424.  
  425.     self.dustTime = self.dustTime + dt;
  426.     if( self.dustTime<.1 ) then return end
  427.     self.dustTime = 0;
  428.  
  429.     if(self.rotorOn == 1) then
  430.         if(self.rotorSpeed < self.rotorSpeedMax ) then
  431.             self.rotorSpeed = self.rotorSpeed + self.rotorSpeedUp;
  432.             self:SetShaderFloat( "Speed", self.rotorSpeed, 1, 1);
  433.             
  434. --System:Log("\001 SetShaderFloat "..self:GetName());            
  435.             
  436.         end
  437.     else
  438.         if(self.rotorSpeed > 0 ) then
  439.             self.rotorSpeed = self.rotorSpeed - self.rotorSpeedUp;
  440.             if(self.rotorSpeed < 0 ) then
  441.                 self.rotorSpeed = 0;
  442.             end    
  443.             self:SetShaderFloat( "Speed", self.rotorSpeed, 1, 1);
  444. --System:Log("\001 SetShaderFloat 1 "..self:GetName());                        
  445.         end
  446.     end    
  447.  
  448.     HC.DoRotor( self, "rotor1" );
  449.     HC.DoRotor( self, "rotor2" );
  450.  
  451. end
  452.  
  453. --------------------------------------------------------------------------------------------------------------
  454. --
  455. function HC:DoRotor( hlpName )
  456.  
  457. local pos = self:GetHelperPos(hlpName,0);
  458. --self:GetPos();
  459. local water = Game:GetWaterHeight( );
  460. local terrain = System:GetTerrainElevation( pos );
  461. local dist=0;
  462.  
  463. --MAX - add different ground effects ( dust/water ) here
  464.  
  465.     if( terrain < water ) then -- abow water - do water water ripples particles 
  466.         dist = pos.z - water;
  467.         if( dist >15 ) then return end
  468.         pos.z = water;
  469.         Particle:CreateParticle(pos,g_Vectors.v011,self.WaterParticle); --vector(0,0,1) is up
  470.         Particle:CreateParticle(pos,g_Vectors.v000,self.WaterRipples); --vector(0,0,1) is up        
  471.  
  472.     else    -- do dust 
  473.         dist = pos.z - terrain;
  474.         if( dist > 17 ) then return end
  475.         pos.z = terrain;
  476. --        self.Elementsparticle.rotation.X=rand(0,2);
  477.  
  478. --        for idx=1, 3 do
  479.     
  480.         local curPos = pos;
  481.         
  482.         curPos.x = curPos.x + random(0,8) - 4;
  483.         curPos.y = curPos.y + random(0,8) - 4;        
  484.         
  485.         Particle:CreateParticle(curPos,g_Vectors.v001,self.Elementsparticle); --vector(0,0,1) is up
  486.         Particle:CreateParticle(curPos,g_Vectors.v001,self.Dustparticle); --vector(0,0,1) is up
  487.         
  488. --        end
  489.  
  490.         
  491.     end
  492.     
  493. end
  494.  
  495.  
  496.  
  497. --------------------------------------------------------------------------------------------------------------
  498. --
  499. --------------------------------------------------------------------------------------------------------------
  500.  
  501. --------------------------------------------------------------------------------------------------------------
  502. --
  503. function HC:StartRotor( )
  504.  
  505.  
  506. --System:Log("\001 start rotors "..self:GetName());
  507.  
  508.     if(self.rotorSpeed<1) then    
  509.         self.rotorSpeed = 1;
  510.     end    
  511.     self.rotorOn = 1;
  512.     
  513.     Sound:SetSoundLoop(self.sound_engine, 1);    
  514.     
  515.     self.CurrEngineSoundTimeout = self.EngineSoundTimeout;    
  516.     if (self.Properties.bFadeEngineSound==0) then
  517.         if (not Sound:IsPlaying(self.sound_engine)) then
  518.             self:PlaySound(self.sound_engine, 0);
  519.             self.CurrEngineFade=self.FadeEngineTime;
  520.             self.FadeDir=1;
  521.         end
  522.     else
  523.         if (self.sound_engine_start) then
  524.             self:PlaySound(self.sound_engine_start);
  525.         end
  526.     end
  527.     
  528.     self:SwitchLight(1);    -- switch on attached lights    
  529.     
  530. end
  531.  
  532.  
  533. --------------------------------------------------------------------------------------------------------------
  534. --
  535. function HC:StartRotorFull(  )
  536.  
  537. --System:Log("\001 start rotors "..self:GetName());
  538.     self.rotorSpeed = self.rotorSpeedMax-1;
  539.     self.rotorOn = 1;
  540.     
  541.     Sound:SetSoundLoop(self.sound_engine, 1);    
  542.  
  543.     if (not Sound:IsPlaying(self.sound_engine)) then
  544.         self:PlaySound(self.sound_engine);
  545.     end
  546.     self:SwitchLight(1);    -- switch on attached lights    
  547.  
  548.     self:SetAICustomFloat( self.Properties.fFlightAltitude );
  549.  
  550.  
  551. end
  552.  
  553.  
  554. --------------------------------------------------------------------------------------------------------------
  555. --
  556. function HC:StopRotor( )
  557.  
  558.     self.rotorOn = 0;
  559.     
  560.     self:SwitchLight(0);    -- switch on attached lights    
  561. end
  562.  
  563.  
  564.  
  565. --------------------------------------------------------------------------------------------------------------
  566. --
  567. function HC:StopEngineSounds( )
  568.  
  569.     if (self.sound_engine) then
  570.         Sound:StopSound(self.sound_engine);
  571.         self.sound_engine = nil;
  572.     end
  573.     if (self.sound_engine_start) then
  574.         Sound:StopSound(self.sound_engine_start);
  575.         self.sound_engine_start = nil;
  576.     end
  577.     if (self.sound_engine_stop) then
  578.         Sound:StopSound(self.sound_engine_stop);
  579.         self.sound_engine_stop = nil;
  580.     end
  581.  
  582. end
  583.  
  584.  
  585. ----------------------------------------------------------------------------------------------------------------------------
  586. --
  587. --
  588.  
  589.  
  590. function HC:OnSave(stm)
  591.  
  592.     stm:WriteString( self.Behaviour.Name );
  593.     stm:WriteInt(self.pathStep);
  594.     stm:WriteInt(self.dropState);
  595.     stm:WriteInt(self.troopersNumber);
  596.  
  597. end
  598.  
  599.  
  600.  
  601. ----------------------------------------------------------------------------------------------------------------------------
  602. --
  603. --
  604.  
  605. function HC:OnLoad(stm)
  606. --
  607.     local behaviourName = stm:ReadString( );
  608.     self.pathStep = stm:ReadInt();
  609.     self.dropState = stm:ReadInt();
  610.     self.troopersNumber = stm:ReadInt();
  611.  
  612.     if( behaviourName == "Heli_attack" ) then
  613.         HC.StartRotorFull( self );
  614.         self:SetAICustomFloat( self.Properties.fAttackAltitude );        
  615.         VC.AIDriver( self, 1 );    
  616.         AI:Signal(0, 1, "ATTACK_RESTORE", self.id);
  617.         self.RestoringState = 1;
  618.     elseif( behaviourName == "Heli_path" ) then
  619.         HC.StartRotorFull( self );
  620.         self:SetAICustomFloat( self.Properties.fFlightAltitude );        
  621.         VC.AIDriver( self, 1 );    
  622.         AI:Signal(0, 1, "PATH_RESTORE", self.id);
  623.         self.RestoringState = 1;
  624.     elseif( behaviourName == "Heli_patrol" ) then
  625.         HC.StartRotorFull( self );
  626.         self:SetAICustomFloat( self.Properties.fFlightAltitude );        
  627.         VC.AIDriver( self, 1 );    
  628.         AI:Signal(0, 1, "PATROL_RESTORE", self.id);
  629.         self.RestoringState = 1;
  630.     elseif( behaviourName == "Heli_transport" ) then
  631.         HC.StartRotorFull( self );
  632.         self:SetAICustomFloat( self.Properties.fFlightAltitude );
  633.         VC.AIDriver( self, 1 );    
  634. --        AI:Signal(0, 1, "REINFORCMENT_RESTORE", self.id);
  635.         self.RestoringState = 1;
  636.  
  637.         if(self.dropState == 2 ) then
  638.             self.troopersNumber = 0;
  639.             AI:Signal(0, 1, "READY_TO_GO", self.id);    -- abort dropping - go to base
  640. --            self:SelectPipe(0,"h_timeout_readytogo");
  641.         else
  642.             AI:Signal(0, 1, "REINFORCMENT_RESTORE", self.id);
  643.         end
  644.  
  645.  
  646. --        if(self.dropState == 2 and self.DoDropPeople) then
  647. --            if(self.troopersNumber ~= VC.CountPassenger(self)) then
  648. --                AI:Signal(0, 1, "ON_GROUND", self.id);
  649. --            else
  650. --                self:SpawnStuff();
  651. --                self:DoDropPeople();
  652. --            end    
  653. --        end
  654.  
  655. --System:Log("\001 restoring REINFORC   ");
  656.     end
  657. end
  658.  
  659.  
  660. --------------------------------------------------------------------------------------------------------------
  661.  
  662.  
  663.  
  664. ----------------------------------------------------------------------------------------------------------------------------
  665. --
  666. --
  667.